package ru.amse.tsyganov.jumleditor.model.collaboration;

import ru.amse.tsyganov.jumleditor.model.common.Edge;
import ru.amse.tsyganov.jumleditor.model.common.StateVertex;

public class Message extends Edge {
	
	private String operation = "operation";
	
	private String argument = "";
	
	private String returnValue = "";
	
	private String sequenceNumber = "1";
	
	private boolean synchronous = false;
	
	private String condition = "";
	
	private String iteration = "";

	public Message(
			StateVertex sourceVertex, 
			StateVertex targetVertex) {
		
		super(sourceVertex, targetVertex);
	}

	public String getClassName() {
		return "Message";
	}

	public String getArgument() {
		return argument;
	}

	public void setArgument(String argument) {
		if (argument == null) {
			throw new NullPointerException();
		}
		this.argument = argument;
	}

	public String getCondition() {
		return condition;
	}

	public void setCondition(String condition) {
		if (condition == null) {
			throw new NullPointerException();
		}
		this.condition = condition;
	}

	public String getIteration() {
		return iteration;
	}

	public void setIteration(String iteration) {
		if (iteration == null) {
			throw new NullPointerException();
		}
		this.iteration = iteration;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		if (operation == null) {
			throw new NullPointerException();
		}
		this.operation = operation;
	}

	public String getReturnValue() {
		return returnValue;
	}

	public void setReturnValue(String returnValue) {
		if (returnValue == null) {
			throw new NullPointerException();
		}
		this.returnValue = returnValue;
	}

	public String getSequenceNumber() {
		return sequenceNumber;
	}

	public void setSequenceNumber(String sequenceNumber) {
		if (sequenceNumber == null) {
			throw new NullPointerException();
		}
		this.sequenceNumber = sequenceNumber;
	}

	public boolean isSynchronous() {
		return synchronous;
	}

	public void setSynchronous(boolean synchronous) {
		this.synchronous = synchronous;
	}

}
